using System;
using Imagination;

namespace Imagination.Collisions
{
    /// <summary>
    /// CollisionDetector is a game service for collision detection.
    /// </summary>
	public abstract class CollisionDetector
	{
		protected int counterHits = 0;
		protected int counterMisses = 0;

		public int CounterCollisionChecks
		{
			get { return counterHits + counterMisses; }
		}

		public int CounterHits
		{
			get { return counterHits; }
		}

		public int CounterMisses
		{
			get { return counterMisses; }
		}

		public virtual void BeginDetection()
		{
			counterHits = 0;
			counterMisses = 0;
		}

		public abstract Collision DetectCollision(Thing thing1, Thing thing2);
	}
}
